home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Tools / Languages / MacGambit 2.0 / sources1 / Runtime (.c & .h) / ext_mac.c < prev    next >
Encoding:
Text File  |  1992-11-13  |  26.1 KB  |  485 lines  |  [TEXT/KAHL]

  1. /* Macintosh specific extensions */
  2.  
  3. /* This file is intended to be used for the addition of Scheme procedures */
  4. /* to access machine specific features (such as Toolbox routines).        */
  5.  
  6. #include "os.h"
  7. #include "mem.h"
  8.  
  9. #include "os_mac.h"
  10.  
  11. #include "os_mac_Help.h"
  12.  
  13. /*---------------------------------------------------------------------------*/
  14.  
  15. void pascal_str( str, pstr ) /* utility to convert to Pascal string */
  16. SCM_obj str;
  17. Str255 pstr;
  18. { long i, len = SCM_length( str );
  19.   if (len > 255) len = 255
  20.   SetOrigin( (int)SCM_obj_to_int(h), (int)SCM_obj_to_int(v) );
  21.   SetPort( save );
  22.   return (long)SCM_false;
  23. }
  24.  
  25. SCM_obj mac_X23backpat( port, pat )
  26. SCM_obj port, pat;
  27. { GrafPtr save; GetPort( &save ); SetPort( (GrafPtr)SCM_obj_to_int(port) );
  28.   BackPat( SCM_obj_to_str(pat) );
  29.   SetPort( save );
  30.   return (long)SCM_false;
  31. }
  32.  
  33. SCM_obj mac_X23hidecursor()
  34. { HideCursor(); return (long)SCM_false; }
  35.  
  36. SCM_obj mac_X23showcursor()
  37. { ShowCursor(); return (long)SCM_false; }
  38.  
  39. SCM_obj mac_X23pensize( port, width, height )
  40. SCM_obj port, width, height;
  41. { GrafPtr save; GetPort( &save ); SetPort( (GrafPtr)SCM_obj_to_int(port) );
  42.   PenSize( (int)SCM_obj_to_int(width), (int)SCM_obj_to_int(height) );
  43.   SetPort( save );
  44.   return (long)SCM_false;
  45. }
  46.  
  47. SCM_obj mac_X23penmode( port, mode )
  48. SCM_obj port, mode;
  49. { GrafPtr save; GetPort( &save ); SetPort( (GrafPtr)SCM_obj_to_int(port) );
  50.   PenMode( (int)SCM_obj_to_int(mode) );
  51.   SetPort( save );
  52.   return (long)SCM_false;
  53. }
  54.  
  55. SCM_obj mac_X23penpat( port, pat )
  56. SCM_obj port, pat;
  57. { GrafPtr save; GetPort( &save ); SetPort( (GrafPtr)SCM_obj_to_int(port) );
  58.   PenPat( SCM_obj_to_str(pat) );
  59.   SetPort( save );
  60.   return (long)SCM_false;
  61. }
  62.  
  63. SCM_obj mac_X23pennormal( port )
  64. SCM_obj port;
  65. { GrafPtr save; GetPort( &save ); SetPort( (GrafPtr)SCM_obj_to_int(port) );
  66.   PenNormal();
  67.   SetPort( save );
  68.   return (long)SCM_false;
  69. }
  70.  
  71. SCM_obj mac_X23moveto( port, h, v )
  72. SCM_obj port, h, v;
  73. { GrafPtr save; GetPort( &save ); SetPort( (GrafPtr)SCM_obj_to_int(port) );
  74.   MoveTo( (int)SCM_obj_to_int(h), (int)SCM_obj_to_int(v) );
  75.   SetPort( save );
  76.   return (long)SCM_false;
  77. }
  78.  
  79. SCM_obj mac_X23move( port, dh, dv )
  80. SCM_obj port, dh, dv;
  81. { GrafPtr save; GetPort( &save ); SetPort( (GrafPtr)SCM_obj_to_int(port) );
  82.   Move( (int)SCM_obj_to_int(dh), (int)SCM_obj_to_int(dv) );
  83.   SetPort( save );
  84.   return (long)SCM_false;
  85. }
  86.  
  87. SCM_obj mac_X23lineto( port, h, v )
  88. SCM_obj port, h, v;
  89. { GrafPtr save; GetPort( &save ); SetPort( (GrafPtr)SCM_obj_to_int(port) );
  90.   LineTo( (int)SCM_obj_to_int(h), (int)SCM_obj_to_int(v) );
  91.   SetPort( save );
  92.   return (long)SCM_false;
  93. }
  94.  
  95. SCM_obj mac_X23line( port, dh, dv )
  96. SCM_obj port, dh, dv;
  97. { GrafPtr save; GetPort( &save ); SetPort( (GrafPtr)SCM_obj_to_int(port) );
  98.   Line( (int)SCM_obj_to_int(dh), (int)SCM_obj_to_int(dv) );
  99.   SetPort( save );
  100.   return (long)SCM_false;
  101. }
  102.  
  103. SCM_obj mac_X23textfont( port, font )
  104. SCM_obj port, font;
  105. { GrafPtr save; GetPort( &save ); SetPort( (GrafPtr)SCM_obj_to_int(port) );
  106.   TextFont( (int)SCM_obj_to_int(font) );
  107.   SetPort( save );
  108.   return (long)SCM_false;
  109. }
  110.  
  111. SCM_obj mac_X23textface( port, face )
  112. SCM_obj port, face;
  113. { GrafPtr save; GetPort( &save ); SetPort( (GrafPtr)SCM_obj_to_int(port) );
  114.   TextFace( (int)SCM_obj_to_int(face) );
  115.   SetPort( save );
  116.   return (long)SCM_false;
  117. }
  118.  
  119. SCM_obj mac_X23textmode( port, mode )
  120. SCM_obj port, mode;
  121. { GrafPtr save; GetPort( &save ); SetPort( (GrafPtr)SCM_obj_to_int(port) );
  122.   TextMode( (int)SCM_obj_to_int(mode) );
  123.   SetPort( save );
  124.   return (long)SCM_false;
  125. }
  126.  
  127. SCM_obj mac_X23textsize( port, size )
  128. SCM_obj port, size;
  129. { GrafPtr save; GetPort( &save ); SetPort( (GrafPtr)SCM_obj_to_int(port) );
  130.   TextSize( (int)SCM_obj_to_int(size) );
  131.   SetPort( save );
  132.   return (long)SCM_false;
  133. }
  134.  
  135. SCM_obj mac_X23spaceextra( port, extra )
  136. SCM_obj port, extra;
  137. { GrafPtr save; GetPort( &save ); SetPort( (GrafPtr)SCM_obj_to_int(port) );
  138.   SpaceExtra( (int)SCM_obj_to_int(extra) );
  139.   SetPort( save );
  140.   return (long)SCM_false;
  141. }
  142.  
  143. SCM_obj mac_X23drawchar( port, ch ) /* ch is a Scheme character (a fixnum will also do!) */
  144. SCM_obj port, ch;
  145. { GrafPtr save; GetPort( &save ); SetPort( (GrafPtr)SCM_obj_to_int(port) );
  146.   DrawChar( (char)SCM_obj_to_int(ch) );
  147.   SetPort( save );
  148.   return (long)SCM_false;
  149. }
  150.  
  151. SCM_obj mac_X23drawstring( port, s ) /* s is a Scheme string */
  152. SCM_obj port, s;
  153. { GrafPtr save; GetPort( &save ); SetPort( (GrafPtr)SCM_obj_to_int(port) );
  154.   DrawText( SCM_obj_to_str(s), 0, SCM_length(s) );
  155.   SetPort( save );
  156.   return (long)SCM_false;
  157. }
  158.  
  159. SCM_obj mac_X23drawtext( port, textBuf, firstByte, byteCount ) /* textBuf is a Scheme string */
  160. SCM_obj port, textBuf, firstByte, byteCount;
  161. { GrafPtr save; GetPort( &save ); SetPort( (GrafPtr)SCM_obj_to_int(port) );
  162.   DrawText( SCM_obj_to_str(textBuf), (int)SCM_obj_to_int(firstByte), (int)SCM_obj_to_int(byteCount) );
  163.   SetPort( save );
  164.   return (long)SCM_false;
  165. }
  166.  
  167. SCM_obj mac_X23charwidth( port, ch ) /* ch is a Scheme character (a fixnum will also do!) */
  168. SCM_obj port, ch;
  169. { long width;
  170.   GrafPtr save; GetPort( &save ); SetPort( (GrafPtr)SCM_obj_to_int(port) );
  171.   width = CharWidth( (char)SCM_obj_to_int(ch) );
  172.   SetPort( save );
  173.   return SCM_int_to_obj( width );
  174. }
  175.  
  176. SCM_obj mac_X23stringwidth( port, s ) /* s is a Scheme string */
  177. SCM_obj port, s;
  178. { long width;
  179.   GrafPtr save; GetPort( &save ); SetPort( (GrafPtr)SCM_obj_to_int(port) );
  180.   width = TextWidth( SCM_obj_to_str(s), 0, SCM_length(s) );
  181.   SetPort( save );
  182.   return SCM_int_to_obj( width );
  183. }
  184.  
  185. SCM_obj mac_X23textwidth( port, textBuf, firstByte, byteCount ) /* textBuf is a Scheme string */
  186. SCM_obj port, textBuf, firstByte, byteCount;
  187. { long width;
  188.   GrafPtr save; GetPort( &save ); SetPort( (GrafPtr)SCM_obj_to_int(port) );
  189.   width = TextWidth( SCM_obj_to_str(textBuf), (int)SCM_obj_to_int(firstByte), (int)SCM_obj_to_int(byteCount) );
  190.   SetPort( save );
  191.   return SCM_int_to_obj( width );
  192. }
  193.  
  194. SCM_obj mac_X23localtoglobal( port, pt )
  195. SCM_obj port, pt;
  196. { GrafPtr save; GetPort( &save ); SetPort( (GrafPtr)SCM_obj_to_int(port) );
  197.   LocalToGlobal( SCM_obj_to_str(pt) );
  198.   SetPort( save );
  199.   return (long)SCM_false;
  200. }
  201.  
  202. SCM_obj mac_X23globaltolocal( port, pt )
  203. SCM_obj port, pt;
  204. { GrafPtr save; GetPort( &save ); SetPort( (GrafPtr)SCM_obj_to_int(port) );
  205.   GlobalToLocal( SCM_obj_to_str(pt) );
  206.   SetPort( save );
  207.   return (long)SCM_false;
  208. }
  209.  
  210. SCM_obj mac_X23framerect( port, r )
  211. SCM_obj port, r;
  212. { GrafPtr save; GetPort( &save ); SetPort( (GrafPtr)SCM_obj_to_int(port) );
  213.   FrameRect( SCM_obj_to_str(r) );
  214.   SetPort( save );
  215.   return (long)SCM_false;
  216. }
  217.  
  218. SCM_obj mac_X23paintrect( port, r )
  219. SCM_obj port, r;
  220. { GrafPtr save; GetPort( &save ); SetPort( (GrafPtr)SCM_obj_to_int(port) );
  221.   PaintRect( SCM_obj_to_str(r) );
  222.   SetPort( save );
  223.   return (long)SCM_false;
  224. }
  225.  
  226. SCM_obj mac_X23eraserect( port, r )
  227. SCM_obj port, r;
  228. { GrafPtr save; GetPort( &save ); SetPort( (GrafPtr)SCM_obj_to_int(port) );
  229.   EraseRect( SCM_obj_to_str(r) );
  230.   SetPort( save );
  231.   return (long)SCM_false;
  232. }
  233.  
  234. SCM_obj mac_X23invertrect( port, r )
  235. SCM_obj port, r;
  236. { GrafPtr save; GetPort( &save ); SetPort( (GrafPtr)SCM_obj_to_int(port) );
  237.   InvertRect( SCM_obj_to_str(r) );
  238.   SetPort( save );
  239.   return (long)SCM_false;
  240. }
  241.  
  242. SCM_obj mac_X23fillrect( port, r, pat )
  243. SCM_obj port, r, pat;
  244. { GrafPtr save; GetPort( &save ); SetPort( (GrafPtr)SCM_obj_to_int(port) );
  245.   FillRect( SCM_obj_to_str(r), SCM_obj_to_str(pat) );
  246.   SetPort( save );
  247.   return (long)SCM_false;
  248. }
  249.  
  250. SCM_obj mac_X23frameroundrect( port, r, ovWd, ovHt )
  251. SCM_obj port, r, ovWd, ovHt;
  252. { GrafPtr save; GetPort( &save ); SetPort( (GrafPtr)SCM_obj_to_int(port) );
  253.   FrameRoundRect( SCM_obj_to_str(r), (int)SCM_obj_to_int(ovWd), (int)SCM_obj_to_int(ovHt) );
  254.   SetPort( save );
  255.   return (long)SCM_false;
  256. }
  257.  
  258. SCM_obj mac_X23paintroundrect( port, r, ovWd, ovHt )
  259. SCM_obj port, r, ovWd, ovHt;
  260. { GrafPtr save; GetPort( &save ); SetPort( (GrafPtr)SCM_obj_to_int(port) );
  261.   PaintRoundRect( SCM_obj_to_str(r), (int)SCM_obj_to_int(ovWd), (int)SCM_obj_to_int(ovHt) );
  262.   SetPort( save );
  263.   return (long)SCM_false;
  264. }
  265.  
  266. SCM_obj mac_X23eraseroundrect( port, r, ovWd, ovHt )
  267. SCM_obj port, r, ovWd, ovHt;
  268. { GrafPtr save; GetPort( &save ); SetPort( (GrafPtr)SCM_obj_to_int(port) );
  269.   EraseRoundRect( SCM_obj_to_str(r), (int)SCM_obj_to_int(ovWd), (int)SCM_obj_to_int(ovHt) );
  270.   SetPort( save );
  271.   return (long)SCM_false;
  272. }
  273.  
  274. SCM_obj mac_X23invertroundrect( port, r, ovWd, ovHt )
  275. SCM_obj port, r, ovWd, ovHt;
  276. { GrafPtr save; GetPort( &save ); SetPort( (GrafPtr)SCM_obj_to_int(port) );
  277.   InvertRoundRect( SCM_obj_to_str(r), (int)SCM_obj_to_int(ovWd), (int)SCM_obj_to_int(ovHt) );
  278.   SetPort( save );
  279.   return (long)SCM_false;
  280. }
  281.  
  282. SCM_obj mac_X23fillroundrect( port, r, ovWd, ovHt, pat )
  283. SCM_obj port, r, ovWd, ovHt, pat;
  284. { GrafPtr save; GetPort( &save ); SetPorticks;
  285.   Delay( (long)SCM_obj_to_int(numTicks), &finalTicks );
  286.   return SCM_int_to_obj( finalTicks );
  287. }
  288.  
  289. SCM_obj mac_X23sysbeep( duration )
  290. SCM_obj duration;
  291. { SysBeep( (int)SCM_obj_to_int(duration) ); return (long)SCM_false; }
  292.  
  293. SCM_obj mac_X23seteventmask( theMask )
  294. SCM_obj theMask;
  295. { SetEventMask( (int)SCM_obj_to_int(theMask) ); return (long)SCM_false; }
  296.  
  297. SCM_obj mac_X23peek8( ptr )
  298. SCM_obj ptr;
  299. { return SCM_int_to_obj( (long)*((unsigned char *)SCM_obj_to_int(ptr)) ); }
  300.  
  301. SCM_obj mac_X23poke8( ptr, val )
  302. SCM_obj ptr, val;
  303. { *((unsigned char *)SCM_obj_to_int(ptr)) = (unsigned char)SCM_obj_to_int(val);
  304.   return (long)SCM_false;
  305. }
  306.  
  307. SCM_obj mac_X23peek16( ptr )
  308. SCM_obj ptr;
  309. { return SCM_int_to_obj( (long)*((short *)SCM_obj_to_int(ptr)) ); }
  310.  
  311. SCM_obj mac_X23poke16( ptr, val )
  312. SCM_obj ptr, val;
  313. { *((short *)SCM_obj_to_int(ptr)) = (short)SCM_obj_to_int(val);
  314.   return (long)SCM_false;
  315. }
  316.  
  317. SCM_obj mac_X23peek32( ptr )
  318. SCM_obj ptr;
  319. { return SCM_int_to_obj( (long)*((long *)SCM_obj_to_int(ptr)) ); }
  320.  
  321. SCM_obj mac_X23poke32( ptr, val )
  322. SCM_obj ptr, val;
  323. { *((long *)SCM_obj_to_int(ptr)) = (long)SCM_obj_to_int(val);
  324.   return (long)SCM_false;
  325. }
  326.  
  327. extern int edit( /* name, line, chr */ );
  328.  
  329. SCM_obj mac_X23edit( name, line, chr)
  330. SCM_obj name, line, chr;
  331. { SCM_obj result;
  332.   GrafPtr save;
  333.   char pname[FILENAME_LEN];
  334.   char path[FILENAME_LEN];
  335.   char *p = SCM_obj_to_str(name);
  336.   long len = SCM_length(name);
  337.   int full_path = 0;
  338.  
  339.   if ((len == 0) || (len >= FILENAME_LEN)) return (long)SCM_false;
  340.  
  341.   GetPort( &save );
  342.  
  343.   pname[0] = len;
  344.   path[len] = '\0';
  345.   while (len > 0)
  346.   { char c = p[len-1];
  347.     if (c == ':') full_path = 1;
  348.     pname[len] = c;
  349.     len--;
  350.     path[len] = c;
  351.   }
  352.  
  353.   if ((full_path || getfullpathfromcurrentvolume( pname, path, FILENAME_LEN, 1 )) &&
  354.       edit( path, SCM_obj_to_int(line), SCM_obj_to_int(chr) ))
  355.     result = (long)SCM_true;
  356.   else
  357.     result = (long)SCM_false;
  358.  
  359.   SetPort( save );
  360.  
  361.   return result;
  362. }
  363.  
  364. SCM_obj mac_X23help( str )
  365. SCM_obj str;
  366. { Str255 pstr;
  367.   pascal_str( str, pstr );
  368.   help_find( pstr );
  369.   return (long)SCM_false;
  370. }
  371.  
  372. /*---------------------------------------------------------------------------*/
  373.  
  374.  
  375. void ext_init()
  376. { DEFINE_C_PROC(mac_X23newwindow);
  377.   DEFINE_C_PROC(mac_X23getnewwindow);
  378.   DEFINE_C_PROC(mac_X23disposewindow);
  379.   DEFINE_C_PROC(mac_X23setwtitle);
  380.   DEFINE_C_PROC(mac_X23selectwindow);
  381.   DEFINE_C_PROC(mac_X23hidewindow);
  382.   DEFINE_C_PROC(mac_X23showwindow);
  383.   DEFINE_C_PROC(mac_X23frontwindow);
  384.   DEFINE_C_PROC(mac_X23findwindow);
  385.   DEFINE_C_PROC(mac_X23trackgoaway);
  386.   DEFINE_C_PROC(mac_X23dragwindow);
  387.   DEFINE_C_PROC(mac_X23invalrect);
  388.   DEFINE_C_PROC(mac_X23beginupdate);
  389.   DEFINE_C_PROC(mac_X23endupdate);
  390.  
  391.   DEFINE_C_PROC(mac_X23openport);
  392.   DEFINE_C_PROC(mac_X23initport);
  393.   DEFINE_C_PROC(mac_X23closeport);
  394.   DEFINE_C_PROC(mac_X23setport);
  395.   DEFINE_C_PROC(mac_X23getport);
  396.   DEFINE_C_PROC(mac_X23setorigin);
  397.   DEFINE_C_PROC(mac_X23backpat);
  398.   DEFINE_C_PROC(mac_X23hidecursor);
  399.   DEFINE_C_PROC(mac_X23showcursor);
  400.   DEFINE_C_PROC(mac_X23pensize);
  401.   DEFINE_C_PROC(mac_X23penmode);
  402.   DEFINE_C_PROC(mac_X23penpat);
  403.   DEFINE_C_PROC(mac_X23pennormal);
  404.   DEFINE_C_PROC(mac_X23moveto);
  405.   DEFINE_C_PROC(mac_X23move);
  406.   DEFINE_C_PROC(mac_X23lineto);
  407.   DEFINE_C_PROC(mac_X23line);
  408.   DEFINE_C_PROC(mac_X23textfont);
  409.   DEFINE_C_PROC(mac_X23textface);
  410.   DEFINE_C_PROC(mac_X23textmode);
  411.   DEFINE_C_PROC(mac_X23textsize);
  412.   DEFINE_C_PROC(mac_X23spaceextra);
  413.   DEFINE_C_PROC(mac_X23drawchar);
  414.   DEFINE_C_PROC(mac_X23drawstring);
  415.   DEFINE_C_PROC(mac_X23drawtext);
  416.   DEFINE_C_PROC(mac_X23charwidth);
  417.   DEFINE_C_PROC(mac_X23stringwidth);
  418.   DEFINE_C_PROC(mac_X23textwidth);
  419.   DEFINE_C_PROC(mac_X23localtoglobal);
  420.   DEFINE_C_PROC(mac_X23globaltolocal);
  421.   DEFINE_C_PROC(mac_X23framerect);
  422.   DEFINE_C_PROC(mac_X23paintrect);
  423.   DEFINE_C_PROC(mac_X23eraserect);
  424.   DEFINE_C_PROC(mac_X23invertrect);
  425.   DEFINE_C_PROC(mac_X23fillrect);
  426.   DEFINE_C_PROC(mac_X23frameroundrect);
  427.   DEFINE_C_PROC(mac_X23paintroundrect);
  428.   DEFINE_C_PROC(mac_X23eraseroundrect);
  429.   DEFINE_C_PROC(mac_X23invertroundrect);
  430.   DEFINE_C_PROC(mac_X23fillroundrect);
  431.   DEFINE_C_PROC(mac_X23frameoval);
  432.   DEFINE_C_PROC(mac_X23paintoval);
  433.   DEFINE_C_PROC(mac_X23eraseoval);
  434.   DEFINE_C_PROC(mac_X23invertoval);
  435.   DEFINE_C_PROC(mac_X23filloval);
  436.   DEFINE_C_PROC(mac_X23framearc);
  437.   DEFINE_C_PROC(mac_X23paintarc);
  438.   DEFINE_C_PROC(mac_X23erasearc);
  439.   DEFINE_C_PROC(mac_X23invertarc);
  440.   DEFINE_C_PROC(mac_X23fillarc);
  441.  
  442.   DEFINE_C_PROC(mac_X23newmenu);
  443.   DEFINE_C_PROC(mac_X23getmenu);
  444.   DEFINE_C_PROC(mac_X23disposemenu);
  445.   DEFINE_C_PROC(mac_X23appendmenu);
  446.   DEFINE_C_PROC(mac_X23addresmenu);
  447.   DEFINE_C_PROC(mac_X23insertresmenu);
  448.   DEFINE_C_PROC(mac_X23insertmenu);
  449.   DEFINE_C_PROC(mac_X23drawmenubar);
  450.   DEFINE_C_PROC(mac_X23deletemenu);
  451.   DEFINE_C_PROC(mac_X23clearmenubar);
  452.   DEFINE_C_PROC(mac_X23getnewmbar);
  453.   DEFINE_C_PROC(mac_X23getmenubar);
  454.   DEFINE_C_PROC(mac_X23setmenubar);
  455.   DEFINE_C_PROC(mac_X23menuselect);
  456.   DEFINE_C_PROC(mac_X23menukey);
  457.   DEFINE_C_PROC(mac_X23hilitemenu);
  458.   DEFINE_C_PROC(mac_X23disableitem);
  459.   DEFINE_C_PROC(mac_X23enableitem);
  460.   DEFINE_C_PROC(mac_X23getmhandle);
  461.  
  462.   DEFINE_C_PROC(mac_X23sfgetfile);
  463.   DEFINE_C_PROC(mac_X23sfputfile);
  464.  
  465.   DEFINE_C_PROC(mac_X23getmouse);
  466.   DEFINE_C_PROC(mac_X23button);
  467.   DEFINE_C_PROC(mac_X23tickcount);
  468.   DEFINE_C_PROC(mac_X23delay);
  469.   DEFINE_C_PROC(mac_X23sysbeep);
  470.   DEFINE_C_PROC(mac_X23seteventmask);
  471.  
  472.   DEFINE_C_PROC(mac_X23peek8);
  473.   DEFINE_C_PROC(mac_X23poke8);
  474.   DEFINE_C_PROC(mac_X23peek16);
  475.   DEFINE_C_PROC(mac_X23poke16);
  476.   DEFINE_C_PROC(mac_X23peek32);
  477.   DEFINE_C_PROC(mac_X23poke32);
  478.  
  479.   DEFINE_C_PROC(mac_X23edit);
  480.   DEFINE_C_PROC(mac_X23help);
  481. }
  482.  
  483.  
  484. /*---------------------------------------------------------------------------*/
  485.